package com.zcr.service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zcr.mapper.RoleMapper;
import com.zcr.pojo.Manager;
import com.zcr.pojo.Role;
import com.zcr.service.RoleService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @version 1.0
 * @author： 张诚
 * @date： 2021-03-04 16:08
 */
@Service("RoleService")
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements RoleService {

    @Resource
    private RoleMapper roleMapper;

    @Override
    public Role roleByperid(int id) {
        QueryWrapper<Role> wrapper= Wrappers.query();
        wrapper.eq("roleid",id);
        return roleMapper.selectById(id);
    }
}
